package cn.lidar.entity;

import java.io.Serializable;

public class LayUIResult implements Serializable {
    private static final long serialVersionUID = 1L;
    private Integer code;
    private String msg;
    private Object data;

    public static LayUIResult OK(Object data, String mesage) {
        LayUIResult res = new LayUIResult();
        res.setCode(200);
        res.setMsg(mesage);
        res.setData(data);
        return res;

    }

    public static LayUIResult Error(Object data, String mesage) {
        LayUIResult res = new LayUIResult();
        res.setCode(500);
        res.setMsg(mesage);
        res.setData(data);
        return res;

    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

}
